package Example6point3;

public class RMB {
    public static String toString(double x){
        String yuan ="亿仟佰拾万仟佰拾元角分";
        String digit="零壹贰叁肆伍陆柒捌玖";
        String result="";
        int y=(int)(x*100);

        for (int i=yuan.length()-1;y>0&&i>0;i--,y/=10)
            result =""+digit.charAt(y%10)+yuan.charAt(i)+result;
            return  result;
    }
}
